#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

void reverse(int a[], int size)
{
	int left = 0;
	int right = size - 1;
	while (left < right)
	{
		swap(a[left], a[right]);
		left++;
		right--;
	}
}

int main()
{
	int n, size;
	cin >> n >> size;
	int a[1000];
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	reverse(a, size);
	for (int i = 0; i < n; i++)
	{
		cout << a[i] << ' ';
	}
	return 0;
}